﻿''' <summary>
''' Class untuk menampilkan form About yang berisi detail versi aplikasi yang dibuat
''' </summary>

Public Class Apps

    ''' <summary>
    ''' Fungsi untuk mengambil nilai versi aplikasi
    ''' </summary>
    ''' <returns>
    ''' Versi dari aplikasi
    ''' </returns>
    Public Function ProductVersion() As String
        _INFO = My.Application.Info.Version.Major & "." & My.Application.Info.Version.Minor & "." & My.Application.Info.Version.Build & "." & My.Application.Info.Version.Revision
        Return _INFO
    End Function

    ''' <summary>
    ''' Fungsi untuk mengambil nilai versi sistem operasi
    ''' </summary>
    ''' <returns>
    ''' Versi dari sistem operasi
    ''' </returns>
    Public Function OSVersion() As String
        _INFO = My.Computer.Info.OSFullName
        Return _INFO
    End Function

    ''' <summary>
    ''' Fungsi untuk mengambil nilai nama platform
    ''' </summary>
    ''' <returns>
    ''' Nama dari platform
    ''' </returns>
    Public Function PlatformName() As String
        _INFO = My.Computer.Info.OSPlatform
        Return _INFO
    End Function

    ''' <summary>
    ''' Fungsi untuk mengambil nilai hak cipta / tahun pembuatan
    ''' </summary>
    ''' <returns>
    ''' Hak cipta / tahun pembuatan aplikasi
    ''' </returns>
    Public Function Copyright() As String
        _INFO = My.Application.Info.Copyright & " " & My.Application.Info.CompanyName
        Return _INFO
    End Function

    ''' <summary>
    ''' Fungsi untuk mengambil nilai halaman web resmi
    ''' </summary>
    ''' <returns>
    ''' Halaman web resmi dari aplikasi
    ''' </returns>
    Public Function WebAddress() As String
        _INFO = "http://ardhagp.com/category/info/komputer/my-apps/"
        Return _INFO
    End Function

    ''' <summary>
    ''' Fungsi untuk mengambil jenis lisensi aplikasi
    ''' </summary>
    ''' <returns>
    ''' Jenis lisensi dari aplikasi
    ''' </returns>
    Public Function License(ByVal IsOpen As Boolean) As String
        If IsOpen = True Then
            _INFO = "This program is open software; you can redistribute it under the terms of the MS-PL License as published by ArdhaGp.com. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
        Else
            _INFO = "Warning: This computer program is protected by copyright law and international treaties. Unauthorized reproduction or distribution of this program, or any portion of it, may result in severe civil and criminal penalties, and will be prosecuted to the maximum extent possible under the law."
        End If
        Return _INFO
    End Function
End Class
